home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 25 / MacFormat n. 25 (Spain) / MacFormat 25.bin / mac / Demos / Print Artist Demo / PA12-Mac.Dxr / 00358_animSyncTreeone.ls < prev    next >
Encoding:
Text File  |  1996-10-03  |  2.2 KB  |  65 lines

  1. on animSyncTree startmem, endmem, whatSprite, whatsound, whenSound
  2.   global animSpeed
  3.   puppetSprite(whatSprite, 1)
  4.   set loopCounter to 0
  5.   if (whenSound = 1) and (string(whatsound) <> EMPTY) then
  6.     puppetSound(1, whatsound)
  7.   end if
  8.   repeat with x = the number of member startmem to the number of member endmem
  9.     set loopCounter to loopCounter + 1
  10.     if the platform = "Macintosh,PowerPC" then
  11.       wait(animSpeed + 5)
  12.     end if
  13.     if loopCounter > 1 then
  14.       set the memberNum of sprite whatSprite to the number of member startmem + loopCounter
  15.     else
  16.       if loopCounter = 1 then
  17.         set the memberNum of sprite whatSprite to the number of member startmem
  18.       end if
  19.     end if
  20.     updateStage()
  21.   end repeat
  22.   set loopCounter to 0
  23.   repeat with x = the number of member endmem down to the number of member startmem
  24.     set loopCounter to loopCounter - 1
  25.     wait(animSpeed + 5)
  26.     if loopCounter > 1 then
  27.       set the memberNum of sprite whatSprite to the number of member endmem + loopCounter
  28.     else
  29.       if loopCounter = 1 then
  30.         set the memberNum of sprite whatSprite to the number of member endmem
  31.       end if
  32.     end if
  33.     updateStage()
  34.   end repeat
  35.   set loopCounter to 0
  36.   repeat with x = the number of member startmem to the number of member endmem
  37.     set loopCounter to loopCounter + 1
  38.     wait(animSpeed + 5)
  39.     if loopCounter > 1 then
  40.       set the memberNum of sprite whatSprite to the number of member startmem + loopCounter
  41.       if (string(whatsound) <> EMPTY) and (loopCounter = whenSound) then
  42.         puppetSound(1, whatsound)
  43.       end if
  44.     else
  45.       if loopCounter = 1 then
  46.         set the memberNum of sprite whatSprite to the number of member startmem
  47.       end if
  48.     end if
  49.     updateStage()
  50.   end repeat
  51.   set loopCounter to 0
  52.   repeat with x = the number of member endmem down to the number of member startmem
  53.     set loopCounter to loopCounter - 1
  54.     wait(animSpeed + 5)
  55.     if loopCounter > 1 then
  56.       set the memberNum of sprite whatSprite to the number of member endmem + loopCounter
  57.     else
  58.       if loopCounter = 1 then
  59.         set the memberNum of sprite whatSprite to the number of member endmem
  60.       end if
  61.     end if
  62.     updateStage()
  63.   end repeat
  64. end
  65.